<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>生成题目</title>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <script src="https://cdn.tailwindcss.com"></script>
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#2196F3',        // 主色调：天蓝色
                        'primary-light': '#64B5F6', // 浅色调
                        'primary-dark': '#1976D2',  // 深色调
                        secondary: '#4CAF50',       // 辅助色：清新绿
                        accent: '#FF9800',          // 强调色：温暖橙
                        neutral: '#9E9E9E'          // 中性色
                    }
                }
            }
        }
    </script>
    <style>
        body {
            background: #F5F7FA;
        }
        .safe-bottom {
            padding-bottom: calc(env(safe-area-inset-bottom) + 80px);
        }
        /* 添加微妙的渐变效果 */
        .input-bg {
            background: linear-gradient(to right, #F8FAFF, #F5F7FA);
        }
        .btn-gradient {
            background: linear-gradient(to right, #2196F3, #1E88E5);
        }
    </style>
</head>
<body>
    <div class="w-[375px] mx-auto min-h-screen bg-white relative">
        <!-- 顶部导航 -->
        <header class="fixed top-0 w-[375px] z-50 bg-white border-b border-gray-100">
            <div class="h-[48px] px-4 flex items-center justify-between">
                <h1 class="text-lg font-medium text-gray-800">生成题目</h1>
                <button class="text-sm text-primary">
                    <i class="fas fa-question-circle"></i>
                    帮助
                </button>
            </div>
        </header>

        <!-- 主内容区 -->
        <main class="pt-[48px] px-4 safe-bottom">
            <!-- 输入方式选择 -->
            <section class="mt-4">
                <div class="flex justify-between items-center mb-3">
                    <h2 class="text-base font-medium text-gray-800">选择输入方式</h2>
                </div>
                <div class="grid grid-cols-3 gap-3">
                    <button class="h-[88px] bg-primary/5 rounded-xl flex flex-col items-center justify-center group hover:bg-primary/10 transition-all">
                        <i class="fas fa-keyboard text-xl text-primary mb-2"></i>
                        <span class="text-sm text-gray-700">手动输入</span>
                        <span class="text-xs text-gray-400 mt-1">限6个汉字</span>
                    </button>
                    <button class="h-[88px] bg-primary/5 rounded-xl flex flex-col items-center justify-center group hover:bg-primary/10 transition-all">
                        <i class="fas fa-list-ol text-xl text-primary mb-2"></i>
                        <span class="text-sm text-gray-700">单元选择</span>
                        <span class="text-xs text-gray-400 mt-1">1-60单元</span>
                    </button>
                    <button class="h-[88px] bg-primary/5 rounded-xl flex flex-col items-center justify-center group hover:bg-primary/10 transition-all">
                        <i class="fas fa-camera text-xl text-primary mb-2"></i>
                        <span class="text-sm text-gray-700">拍照识别</span>
                        <span class="text-xs text-gray-400 mt-1">自动识别</span>
                    </button>
                </div>
            </section>

            <!-- 手动输入区域 -->
            <section class="mt-6">
                <div class="flex justify-between items-center mb-3">
                    <h2 class="text-base font-medium text-gray-800">输入汉字</h2>
                    <span class="text-xs text-gray-400">已输入: 0/6</span>
                </div>
                <div class="relative">
                    <input type="text" 
                           maxlength="6" 
                           class="w-full h-[52px] px-4 input-bg rounded-xl focus:outline-none focus:ring-2 focus:ring-primary focus:ring-opacity-50 transition-all text-gray-700"
                           placeholder="请输入要学习的汉字">
                    <button class="absolute right-3 top-1/2 -translate-y-1/2 text-neutral">
                        <i class="fas fa-times-circle"></i>
                    </button>
                </div>
            </section>

            <!-- 难度选择 -->
            <section class="mt-6">
                <h2 class="text-base font-medium text-gray-800 mb-3">难度选择</h2>
                <div class="grid grid-cols-3 gap-3">
                    <button class="h-[44px] btn-gradient text-white rounded-xl shadow-sm">容易</button>
                    <button class="h-[44px] bg-gray-50 text-gray-600 rounded-xl hover:bg-gray-100 transition-all">中等</button>
                    <button class="h-[44px] bg-gray-50 text-gray-600 rounded-xl hover:bg-gray-100 transition-all">较难</button>
                </div>
            </section>

            <!-- 语言风格 -->
            <section class="mt-6">
                <h2 class="text-base font-medium text-gray-800 mb-3">语言风格</h2>
                <div class="grid grid-cols-3 gap-3">
                    <button class="h-[44px] btn-gradient text-white rounded-xl shadow-sm">标准</button>
                    <button class="h-[44px] bg-gray-50 text-gray-600 rounded-xl hover:bg-gray-100 transition-all">趣味</button>
                    <button class="h-[44px] bg-gray-50 text-gray-600 rounded-xl hover:bg-gray-100 transition-all">文学</button>
                </div>
            </section>
        </main>

        <!-- 底部导航栏 -->
        <nav class="fixed bottom-0 w-[375px] bg-white border-t border-gray-100">
            <div class="grid grid-cols-5 h-[56px]">
                <a href="generate.html" class="flex flex-col items-center justify-center">
                    <i class="fas fa-plus-circle text-primary"></i>
                    <span class="text-xs mt-1 text-primary">生成</span>
                </a>
                <a href="study.html" class="flex flex-col items-center justify-center">
                    <i class="fas fa-book text-gray-400"></i>
                    <span class="text-xs mt-1 text-gray-400">学习</span>
                </a>
                <a href="history.html" class="flex flex-col items-center justify-center">
                    <i class="fas fa-history text-gray-400"></i>
                    <span class="text-xs mt-1 text-gray-400">历史</span>
                </a>
                <a href="rewards.html" class="flex flex-col items-center justify-center">
                    <i class="fas fa-gift text-gray-400"></i>
                    <span class="text-xs mt-1 text-gray-400">奖励</span>
                </a>
                <a href="profile.html" class="flex flex-col items-center justify-center">
                    <i class="fas fa-user text-gray-400"></i>
                    <span class="text-xs mt-1 text-gray-400">我的</span>
                </a>
            </div>
            <!-- 底部安全区域适配 -->
            <div class="h-[env(safe-area-inset-bottom)]"></div>
        </nav>

        <!-- 生成按钮 -->
        <div class="fixed bottom-[56px] left-0 w-[375px] bg-white border-t border-gray-100 px-4 py-3">
            <button class="w-full h-[48px] btn-gradient text-white rounded-xl flex items-center justify-center text-base font-medium shadow-sm hover:opacity-95 transition-all">
                开始生成
            </button>
        </div>

        <!-- 拍照识别弹窗 -->
        <div class="fixed inset-0 bg-black/50 hidden items-center justify-center">
            <div class="w-[320px] bg-white rounded-xl p-4">
                <div class="aspect-[4/3] bg-gray-50 rounded-xl mb-4 flex items-center justify-center">
                    <i class="fas fa-camera text-4xl text-gray-300"></i>
                </div>
                <div class="flex gap-3">
                    <button class="flex-1 h-[44px] bg-gray-50 text-gray-600 rounded-xl hover:bg-gray-100 transition-all">取消</button>
                    <button class="flex-1 h-[44px] btn-gradient text-white rounded-xl shadow-sm hover:opacity-95 transition-all">拍照</button>
                </div>
            </div>
        </div>
    </div>
</body>
</html>